package com.ruoyi.finance.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.finance.domain.TCwReceiptPlan;
import com.ruoyi.finance.mapper.TCwReceiptPlanMapper;
import com.ruoyi.finance.service.ITCwReceiptPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 收款计划Service业务层处理
 * 
 * @author wish
 * @date 2021-06-19
 */
@Service
public class TCwReceiptPlanServiceImpl implements ITCwReceiptPlanService
{
    @Autowired
    private TCwReceiptPlanMapper tCwReceiptPlanMapper;

    /**
     * 查询收款计划
     * 
     * @param id 收款计划ID
     * @return 收款计划
     */
    @Override
    public TCwReceiptPlan selectTCwReceiptPlanById(Long id)
    {
        return tCwReceiptPlanMapper.selectTCwReceiptPlanById(id);
    }

    /**
     * 查询收款计划列表
     * 
     * @param tCwReceiptPlan 收款计划
     * @return 收款计划
     */
    @Override
    public List<TCwReceiptPlan> selectTCwReceiptPlanList(TCwReceiptPlan tCwReceiptPlan)
    {
        return tCwReceiptPlanMapper.selectTCwReceiptPlanList(tCwReceiptPlan);
    }

    /**
     * 新增收款计划
     * 
     * @param tCwReceiptPlan 收款计划
     * @return 结果
     */
    @Override
    public int insertTCwReceiptPlan(TCwReceiptPlan tCwReceiptPlan)
    {
        tCwReceiptPlan.setCreateTime(DateUtils.getNowDate());
        return tCwReceiptPlanMapper.insertTCwReceiptPlan(tCwReceiptPlan);
    }

    /**
     * 修改收款计划
     * 
     * @param tCwReceiptPlan 收款计划
     * @return 结果
     */
    @Override
    public int updateTCwReceiptPlan(TCwReceiptPlan tCwReceiptPlan)
    {
        tCwReceiptPlan.setUpdateTime(DateUtils.getNowDate());
        return tCwReceiptPlanMapper.updateTCwReceiptPlan(tCwReceiptPlan);
    }

    /**
     * 批量删除收款计划
     * 
     * @param ids 需要删除的收款计划ID
     * @return 结果
     */
    @Override
    public int deleteTCwReceiptPlanByIds(Long[] ids)
    {
        return tCwReceiptPlanMapper.deleteTCwReceiptPlanByIds(ids);
    }

    /**
     * 删除收款计划信息
     * 
     * @param id 收款计划ID
     * @return 结果
     */
    @Override
    public int deleteTCwReceiptPlanById(Long id)
    {
        return tCwReceiptPlanMapper.deleteTCwReceiptPlanById(id);
    }

    @Override
    public List<TCwReceiptPlan> findAll(TCwReceiptPlan tCwReceiptPlan) {
        return tCwReceiptPlanMapper.findAll(tCwReceiptPlan);
    }

    /*@Override
    public List<TCwReceiptPlan> findAll() {
        return tCwReceiptPlanMapper.findAll();
    }*/
}
